package kr.saeildadim.androidexam_saeildamil.chapter17;

import java.util.ArrayList;



import android.app.Activity;
import android.os.Bundle;

public class Ch17_SaveCurve extends Activity {
	private MyView vw;
	ArrayList<Vertex> arVertex;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	
		if (savedInstanceState==null){
			arVertex = new ArrayList<Vertex>();
		}else{
			arVertex = (ArrayList<Vertex>) savedInstanceState.getSerializable("Curve");
		}
		
		vw = new MyView(this, arVertex);
		setContentView(vw);
	}
	
	@Override
	protected void onSaveInstanceState(Bundle outState) {
		super.onSaveInstanceState(outState);
		outState.putSerializable("Curve", arVertex);
	}
}
